package com.sixmac.service;

import com.sixmac.entity.AppUser;
import com.sixmac.entity.SysUser;
import com.sixmac.service.common.ICommonService;
import org.springframework.data.domain.Page;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2016/3/4 0004 下午 2:52.
 */
public interface AppUserService extends ICommonService<AppUser> {

    // 总后台管理员登录
    public SysUser sysUserLogin(HttpSession session, String username, String password);

    public void logOut(HttpServletRequest request);

    // 移动端用户登录
    public AppUser iLogin(String mobile, String password);

    // 移动端用户通过手机号登录
    public AppUser iLogin(String mobile);

    // 移动端根据用户手机号获取用户信息
    public AppUser iFindOneByMobile(String mobile);

    public Page<AppUser> page(String mobile, Integer status, Integer pageNum, Integer pageSize);

    // 查询新增会员列表
    public List<AppUser> findListNew();

    public void deleteById(HttpServletRequest request, Integer id);

    public void deleteAll(HttpServletRequest request, int[] ids);

    public AppUser update(HttpServletRequest request, Integer id, Integer status);

    public void updateAll(HttpServletRequest request, int[] ids, Integer status);

    // 获取所有已启用的app用户列表
    public List<AppUser> findList(String mobile);

    public List<Map<String, Object>> pageToExcel(HttpServletRequest request, Map<String, Object> map);
}